﻿using AutoMapper;
using B.S.Procurement.Domain;
using B.S.Procurement.Domain.Extraction;
using B.S.Procurement.Domain.Sale;
using B.S.Procurement.Domain.SalesReturns;
using B.S.Procurement.Write.Api.Application.Command.ClientCommand;
using B.S.Procurement.Write.Api.Application.Command.DetailsCommand;
using B.S.Procurement.Write.Api.Application.Command.ExtractionDetailsCommand;
using B.S.Procurement.Write.Api.Application.Command.ExtractionModelCommand;
using B.S.Procurement.Write.Api.Application.Command.ItemizedReturnsCommand;
using B.S.Procurement.Write.Api.Application.Command.ProcurementCommand;
using B.S.Procurement.Write.Api.Application.Command.ProductsModelCommand;
using B.S.Procurement.Write.Api.Application.Command.PurchaseCommand;
using B.S.Procurement.Write.Api.Application.Command.PurchaseDetailsCommand;
using B.S.Procurement.Write.Api.Application.Command.SaleCommand;
using B.S.Procurement.Write.Api.Application.Command.SalesReturnsModelCommand;
using B.S.Procurement.Write.Api.Application.Command.VendorModelCommand;
using B.S.Procurement.Write.Api.Application.Command.VendorTypeModelCommand;

namespace B.S.Procurement.Write.Api
{
    public class MyMapperProfile : Profile
    {
        public MyMapperProfile() 
        {
            CreateMap<CreateProcurementCommands, ProcurementModel>().ReverseMap();
            CreateMap<UpdProcurementCommand, ProcurementModel>().ReverseMap();
            CreateMap<createProchaseCommand, Purchase>().ReverseMap();
            CreateMap<CreatePurchaseDetailsCommand, PurchaseDetails>().ReverseMap();
            CreateMap<CreateVendorModelCommand, VendorModel>().ReverseMap();
            CreateMap<UpdVendorModelCommand, VendorModel>().ReverseMap();
            CreateMap<CreateVendorTypeModelCommand, VendorTypeModel>().ReverseMap();
            CreateMap<UpdPurchaseDetailsCommand, PurchaseDetails>().ReverseMap();

            CreateMap<CreateProductsModelCommand, ProductsModel>().ReverseMap();
            CreateMap<UpdProductsModelCommand, ProductsModel>().ReverseMap();

            CreateMap<CreateClientCommand, Client>().ReverseMap();
            CreateMap<UpdClientCommand, Client>().ReverseMap();

            CreateMap<CreateSaleCommand, SaleModel>().ReverseMap();

            CreateMap<CreateDetailsCommand, Details>().ReverseMap();
            CreateMap<DelDetailsCommand, Details>().ReverseMap();

            CreateMap<CreateSalesReturnsModelCommand, SalesReturnsModel>().ReverseMap();

            CreateMap<CreateItemizedReturnsCommand, ItemizedReturns>().ReverseMap();
            CreateMap<UpdItemizedReturnsCommand, ItemizedReturns>().ReverseMap();


            CreateMap<CreateExtractionModel, ExtractionModel>().ReverseMap();


            CreateMap<CreateExtractionDetailsCommand, ExtractionDetails>().ReverseMap();
            CreateMap<UpdExtractionDetailsCommand, ExtractionDetails>().ReverseMap();
        }
    }
}
